<template>
  <footer class="app-footer">
    <div class="footer-container">
      <!-- 主要内容区域 -->
      <div class="footer-content">
        <!-- 快速入口 -->
        <div class="footer-section">
          <h3 class="footer-title">{{ $t('message.quickLinks') }}</h3>
          <ul class="footer-links">
            <li><a href="/" class="footer-link">{{ $t('message.home') }}</a></li>
            <li><a href="/about" class="footer-link">{{ $t('message.about') }}</a></li>
            <li><a href="/products" class="footer-link">{{ $t('message.products') }}</a></li>
            <li><a href="/contact" class="footer-link">{{ $t('message.contact') }}</a></li>
          </ul>
        </div>

        <!-- 联系我们 -->
        <div class="footer-section">
          <h3 class="footer-title">{{ $t('footer.contact.title') }}</h3>
          <div class="contact-info">
            <p class="contact-item">
              <v-icon small class="contact-icon">mdi-map-marker</v-icon>
              {{ $t('footer.contact.address') }}
            </p>
            <p class="contact-item">
              <v-icon small class="contact-icon">mdi-phone</v-icon>
              {{ $t('footer.contact.phone') }}
            </p>
            <p class="contact-item">
              <v-icon small class="contact-icon">mdi-email</v-icon>
              {{ $t('footer.contact.email') }}
            </p>
          </div>
        </div>

        <!-- 公司信息 -->
        <div class="footer-section">
          <h3 class="footer-title">{{ $t('footer.company') }}</h3>
          <div class="company-info">
            <p>{{ $t('footer.description') }}</p>
            <div class="social-links">
              <v-btn icon small class="social-btn">
                <v-icon>mdi-wechat</v-icon>
              </v-btn>
              <v-btn icon small class="social-btn">
                <v-icon>mdi-qqchat</v-icon>
              </v-btn>
              <v-btn icon small class="social-btn">
                <v-icon>mdi-sina-weibo</v-icon>
              </v-btn>
            </div>
          </div>
        </div>
      </div>

      <!-- 底部版权和备案信息 -->
      <div class="footer-bottom">
        <div class="copyright">
          <p>&copy; {{ new Date().getFullYear() }} {{ $t('footer.company') }} {{ $t('footer.copyright') }}</p>
          <p class="icp-info">
            <a href="https://beian.miit.gov.cn/" target="_blank" class="icp-link">
              鄂ICP备2025121263号-1
            </a>
            |
            <a href="http://www.beian.gov.cn/" target="_blank" class="icp-link">
              <!-- 京公网安备 11010502012345号 -->
            </a>
          </p>
        </div>
      </div>
    </div>
  </footer>
</template>

<script>
export default {
  name: 'AppFooter'
}
</script>

<style scoped>
.app-footer {
  background-color: #222;
  color: #fff;
  padding: 40px 0 0;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer-section {
  display: flex;
  flex-direction: column;
}

.footer-title {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  border-bottom: 2px solid #007bff;
  padding-bottom: 10px;
  display: inline-block;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-link {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 14px;
}

.footer-link:hover {
  color: #007bff;
  text-decoration: none;
}

.contact-info,
.company-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-item {
  display: flex;
  align-items: center;
  color: #ccc;
  font-size: 14px;
  margin: 0;
}

.contact-icon {
  margin-right: 8px;
  color: #007bff;
}

.company-info p {
  color: #ccc;
  font-size: 14px;
  margin: 0 0 8px 0;
}

.social-links {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.social-btn {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ccc;
  transition: all 0.3s ease;
}

.social-btn:hover {
  background-color: #007bff;
  color: #fff;
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid #444;
  padding: 20px 0;
  text-align: center;
}

.copyright {
  color: #999;
  font-size: 13px;
}

.copyright p {
  margin: 5px 0;
}

.icp-info {
  margin-top: 8px;
}

.icp-link {
  color: #999;
  text-decoration: none;
  margin: 0 5px;
  transition: color 0.3s ease;
}

.icp-link:hover {
  color: #007bff;
  text-decoration: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .app-footer {
    padding: 30px 0 0;
  }
  
  .footer-container {
    padding: 0 15px;
  }
  
  .footer-title {
    font-size: 16px;
  }
  
  .social-links {
    justify-content: center;
  }
}
</style>